package com.tywj.panda.home.entity

import android.os.Parcel
import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import com.tywj.lib.businessweak.entity.AbsPagingEntity


/**
 * <pre>
 *     author : June Yang
 *     time   : 2020/05/18
 *     desc   : 首页中的线路信息
 *     version: 1.0.0
 * </pre>
 */
class HomeLineEntity : AbsPagingEntity<HomeLineEntity.DataBean>() {

    class DataBean() : Parcelable {


        var name = ""

        @SerializedName("fied_name")
        var fiedName = ""

        // * 状态 3：冻结 5：排班
        var status = 5

        var price = 0

        @SerializedName("line_info_id")
        var lineInfoId = ""

        var note = ""

        //* 状态 1：常用 2：推荐
        var type = 1

        constructor(parcel: Parcel) : this() {
            name = parcel.readString() ?: ""
            fiedName = parcel.readString() ?: ""
            status = parcel.readInt()
            price = parcel.readInt()
            lineInfoId = parcel.readString() ?: ""
            note = parcel.readString() ?: ""
            type = parcel.readInt()
        }

        override fun writeToParcel(dest: Parcel, flags: Int) {
            dest.writeString(name)
            dest.writeString(fiedName)
            dest.writeInt(status)
            dest.writeInt(price)
            dest.writeString(lineInfoId)
            dest.writeString(note)
            dest.writeInt(type)
        }

        override fun describeContents(): Int = 0

        companion object CREATOR : Parcelable.Creator<DataBean> {
            override fun createFromParcel(parcel: Parcel): DataBean {
                return DataBean(parcel)
            }

            override fun newArray(size: Int): Array<DataBean?> {
                return arrayOfNulls(size)
            }
        }
    }
}